package com.bdrm.service.impl;

import com.bdrm.entity.Flavor;
import com.bdrm.mapper.FlavorMapper;
import com.bdrm.service.FlavorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FlavorServiceImpl implements FlavorService {

    @Autowired
    private FlavorMapper flavorMapper;
    @Override
    public void save(Flavor flavor) {
        flavorMapper.insert(flavor);
    }

    @Override
    public List<Flavor> list() {
        return flavorMapper.select();
    }

    @Override
    public void update(Flavor flavor) {
        flavorMapper.update(flavor);
    }

    @Override
    public void delete(Long id) {
        flavorMapper.deleteById(id);
    }
}
